<%--
  
  User: Administrator
  Date: 2018/11/26
  Time: 16:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<html>
<head>
    <base href="<%=basePath%>">
    <title>分配给</title>
    <link rel="stylesheet" href="/static/commons/layui/css/layui.css" />
    <link rel="stylesheet" href="/static/css/public.css" />
</head>
<body class="childrenBody">
<form class="layui-form" id="allotForm">

    <div class="layui-form-item">
        <label class="layui-form-label layui-bg-green layui-center">编号</label>
        <div class="layui-input-block">
            <input style="width: 155px" type="text" name="serviceId"  class="layui-input num"   readonly />
        </div>
    </div>
    <div class="layui-form-input">
        <label class="layui-form-label layui-bg-green layui-center">分配给</label>
        <div class="layui-input-block userList" style="width: 155px">
            <select name="userName" lay-verify="required" lay-search >
                <option  value="">请选择</option>
            </select>
        </div>
    </div>
</form>
<script type="text/javascript" src="static/commons/layui/layui.js" ></script>
<script type="text/javascript" src="static/js/serviceManagement/service-allot.js" ></script>

<script type="text/javascript">
    layui.use(['jquery','form'],function(){
        let $ = layui.jquery,
            form = layui.form;

        $.get("service-management/findRoleName",function(dataR){
            dataR.data.roles.forEach(function(role){
                $(".userList select").append("<option value='"+role.name+"'>"+role.name+"</option>");
            });
            form.render('select');
        });
    });
</script>


</body>
</html>

